Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

305
Views
(Nginx Windows) nginx: [emerg] unknown directive "serversupstream"

I got this code while executing nginx:

nginx: [emerg] unknown directive "serversupstream" in C:\nginx-1.17.9/conf/nginx.conf:15

This is my nginx.conf:

#user  nobody;
worker_processes  1;
events {
  worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;

    # List of application 
    serversupstream portal_server {
      server 127.0.0.1:9510;
    }
    upstream portal_web_server {
      server 127.0.0.1:8085;
    }
    server {
      listen       8001;
      server_name  localhost;
      location /api {
          proxy_pass <http://portal_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
      location /dte {
          proxy_pass <http://portal_web_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
      location /simulacion {
          proxy_pass <http://portal_web_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
    }
    include servers/*;
}

I don't know that error message, what it is?

EDIT:

According to http://nginx.org/en/docs/dirindex.htm there is no serversupstream I don't understand, I'm just using a nginx.conf that many other guys in the team are using, but they are on mac and/or linux, I'm the only one in Windows.

So, I change serversupstream to upstream and there it triggers another error, it's complaining about the prefix for:

proxy_pass <http://portal_web_server;>

So I change removed those <> and there I tried again, now nginx doesn't show anything in the console... just this:

enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

change encoding of the configfile to Utf8. Don't use built'in Notepad.exe to Save as to Uft8, it will save as Utf8 BOM. Use Notepad++ or other editor.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!